#include <iostream>
using namespace std;
#include <math.h>

class MyPoint {

    friend double mydistance(MyPoint &p1,MyPoint &p2);

private:
    int x;
    int y;
public:
    MyPoint(int x,int y) {
        this->x = x;
        this->y = y;
    }
};

double mydistance(MyPoint &p1,MyPoint &p2) {
    return sqrt((p1.x - p2.x)*(p1.x - p2.x) + (p1.y - p2.y)*(p1.y - p2.y));
}

int main() {
    MyPoint Point1(1,2);
    MyPoint Point2(3,4);
    double res = mydistance(Point1,Point2);
    cout<<res<<endl;
    return 0;
}
